package com.imnak0.seminar.displayperformance;

import java.util.ArrayList;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

public class DisplayPerformanceActivity extends Activity {
	private ArrayList<CustomArrayType> list = new ArrayList<CustomArrayType>();
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        // init list
        for (int i=0; i<1000; i++) {
        	switch(i%9) {
        	case 0:
        		list.add(new CustomArrayType(
        				"Seohyeon",
        				"SOSI is a much used geospatial vector data format for predominantly used for exchange of geographical information in Norway.",
        				getResources().getDrawable(R.drawable.sosi9)));
        		break;
        		
        	case 1:
        		list.add(new CustomArrayType(
        				"Taeyeon",
        				"SOSI is a much used geospatial vector data format for predominantly used for exchange of geographical information in Norway.",
        				getResources().getDrawable(R.drawable.sosi1)));
        		break;
        		
        	case 2:
        		list.add(new CustomArrayType(
        				"Tiffany",
        				"SOSI is short for Samordnet Opplegg for Stedfestet Informasjon but more commonly expanded in English to Systematic Organization of Spatial Information).",
        				getResources().getDrawable(R.drawable.sosi2)));
        		break;
        		
        	case 3:
        		list.add(new CustomArrayType(
        				"Sooyoung",
        				"The standard includes standardized definitions for geometry and topology, data quality, coordinate systems, attributes and metadata.",
        				getResources().getDrawable(R.drawable.sosi3)));
        		break;
        		
        	case 4:
        		list.add(new CustomArrayType(
        				"Jessica",
        				"The open standard was developed by the Norwegian Mapping and Cadastre Authority",
        				getResources().getDrawable(R.drawable.sosi4)));
        		break;
        		
        	case 5:
        		list.add(new CustomArrayType(
        				"Yuri",
        				" It was first published in 1987 (version 1.0). It is continuously being revised and further developed",
        				getResources().getDrawable(R.drawable.sosi5)));
        		break;
        		
        	case 6:
        		list.add(new CustomArrayType(
        				"Yuna",
        				"The long term development points towards international standards (ISO 19100).",
        				getResources().getDrawable(R.drawable.sosi6)));
        		break;
        		
        	case 7:
        		list.add(new CustomArrayType(
        				"Sunny",
        				"This work is being done by ISO/TC211, currently chaired by Olaf Østensen with the Norwegian Mapping and Cadastre Authority",
        				getResources().getDrawable(R.drawable.sosi7)));
        		break;
        		
        	case 8:
        		list.add(new CustomArrayType(
        				"Hyoyeon",
        				"Data Quality and Quality Management — Examples of Quality Evaluation Procedures and Quality Management in European National Mapping Agencies",
        				getResources().getDrawable(R.drawable.sosi8)));
        		break;
        	}
        }
        
        ListView listView = (ListView) findViewById(R.id.listView);
        CustomAdapter adapter = new CustomAdapter(this, list);
        listView.setAdapter(adapter);
        
    }
}